﻿@inherits BaseComponent

@if (Visible)
{
    <div class="ws-func">
        <Card Title="@Language[Language.HomeCommonFunc]" Style="height:100%;">
            @if (Menus == null || Menus.Count == 0)
            {
                <Empty />
            }
            else
            {
                foreach (var item in Menus)
                {
                    var menu = Context.UserMenus?.FirstOrDefault(m => m.Name == item);
                    if (menu == null)
                        continue;

                    <div class="ws-func-menu" @onclick="e=>Context.NavigateTo(menu)">
                        <KIcon Icon="@menu.Icon" IsTheme />
                        <KLink Class="name">@Language.GetString(menu)</KLink>
                    </div>
                }
            }
        </Card>
    </div>
}